<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <video id="vedio1">

    </video>
</div>
<script>
    (()=>{
        navigator.mediaDevices.getUserMedia({
            audio:true,
            video:{
                width:{min:1024,ideal:1280,max:1920},
                height:{min:576,ideal:720,max:1080},
                frameRate:{max:30}
            }
        }).then(stream=>{
            console.log(stream);
            const video1=document.getElementById('vedio1');
            video1.srcObject=stream
            video1.onloadedmetadata=function (){
                video1.play()
            }
        })
    })()
</script>

</body>
</html>